package org.ycy.data.generator.entity;

import lombok.Getter;
import lombok.Setter;
import org.ycy.data.generator.constants.Symbol;
import org.ycy.data.generator.enums.StoreType;

import java.util.List;
import java.util.stream.Collectors;

/**
 * @ClassName TemplateConfig
 * @Description 模板配置
 * @Author 原长友
 * @Date 2023/3/3 23:50
 * @Version 1.0
 **/
@Getter
@Setter
public class TemplateConfig {

    private String name;

    private Long lineSize;

    private StoreType storeType;

    private List<Column> columns;

    public String createHeader() {

        return columns.stream().map(item -> item.getColumnCode()).collect(Collectors.joining(Symbol.COMMA));
    }
}
